package com.ajax;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

public class First extends HttpServlet {
    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        //getParameter（）里面输入name值
        String username=req.getParameter("username");
        String pass=req.getParameter("password");
        String tel=req.getParameter("tel");
        String email=req.getParameter("email");

    }

    @Override
    protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        //getParameter（）里面输入name值
        String username=req.getParameter("username");
        String pass=req.getParameter("password");
        String tel=req.getParameter("tel");
        String email=req.getParameter("email");
        resp.sendRedirect("succ.html");
    }
}
